﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HZY.EFCore.Interface
{
    using Microsoft.EntityFrameworkCore;
    using System.Linq;
    using System.Linq.Expressions;
    using System.Threading.Tasks;

    public interface IUnitOfWork
    {
        DbSet<T> Set<T>() where T : class;

        #region 异步方法

        Task<int> SaveAsync();

        Task<bool> CommitAsync(Action Call);

        #endregion

        #region 同步方法

        int Save();

        bool Commit(Action Call);

        #endregion


    }
}
